package cn.webrx;


import cn.webrx.mapper.DbMapper;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@SpringBootApplication
@RestController
@MapperScan("cn.webrx.mapper")
public class App {
    @Autowired
    private DbMapper dm;

    public static void main(String[] args) {
        SpringApplication.run(App.class, args);
    }

    @GetMapping
    public String index() {
        return dm.ver();
    }

    @GetMapping("/tbs")
    public List<String> tbs() {
        return dm.tbs();
    }

    @GetMapping("/dbs")
    public List<String> dbs() {
        return dm.dbs();
    }
}
